import { articles } from "@/api/index"

const state={
  infoList:[]
}
const mutations={
  setInfoList(state,value){
    state.infoList=value
  }
  
}
const actions={
  async  getInfoList(store,id){
    const  res=await articles(id)
    store.commit('setInfoList',res.data.data.results)
    console.log(res);
  }
  
}
const getters={}


export default{
  namespaced:true,
  state,
  mutations,
  actions,
  getters
}